package Day7;

import java.util.Scanner;
// 1:无需package
// 2: 类名必须Main, 不可修改
/**
 * 2021Java真题:直线
 * https://www.lanqiao.cn/problems/1452/learning/?page=1&first_category_id=1&tags=2021,%E7%9C%81%E8%B5%9B&tag_relation=intersection
 */
public class Main2 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        long n = scan.nextLong();
        long s = n / 1000;
        long m = s / 60;
        long h = m / 60 % 24;
        m %= 60;
        s = s % (24 * 60 * 60) % 60;
        System.out.printf("%02d:%02d:%02d",h,m,s);
        scan.close();
    }
}